﻿using dz.u9.jky.schema.Attrib;

namespace dz.u9.jky.schema.Common
{
    /// <summary>
    /// 物料
    /// </summary>
    public class DzItemMaster
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        [DzAlias("SPECS")]
        public string Description { get; set; }

        /// <summary>
        /// 料品形态属性
        /// </summary>
        [DzEnum("UFIDA.U9.CBO.SCM.Item.ItemTypeAttributeEnum,UFIDA.U9.CBO.PubBE")]
        public int ItemFormAttribute { get; set; } = 10;

        /// <summary>
        /// 可库存交易
        /// </summary>
        public bool IsInventoryEnable { get; set; } = true;

        /// <summary>
        /// 可采购
        /// </summary>
        public bool IsPurchaseEnable { get; set; } = true;

        //// <summary>
        ///// 可销售
        ///// </summary>
        public bool IsSalesEnable { get; set; } = true;

        /// <summary>
        /// 可生产
        /// </summary>
        public bool IsBuildEnable { get; set; } = true;

        /// <summary>
        /// 可MRP
        /// </summary>
        public bool IsMRPEnable { get; set; } = true;

        /// <summary>
        /// 可BOM
        /// </summary>
        public bool IsBOMEnable { get; set; } = true;

        [DzSimpleObject("UFIDA.U9.CBO.Pub.Controller.CommonArchiveDataDTO,UFIDA.U9.CBO.PubSV")]
        public string InventoryUOM { get; set; } = "N001";

        /// <summary>
        /// 生效
        /// </summary>
        [DzComplexObject("UFIDA.U9.Base.PropertyTypes.Effective,UFIDA.U9.Base.BaseBE")]
        public DzEffective Effective{ get; set; }

        /// <summary>
        /// 计划信息
        /// </summary>
        [DzComplexObject("UFIDA.U9.ISV.Item.ItemMRPInfoDTO,UFIDA.U9.ISV.Item")]
        public DzItemMRPInfoDTO MrpInfo { get; set; }

        /// <summary>
        /// 库存信息
        /// </summary>
        [DzComplexObject("UFIDA.U9.ISV.Item.ItemInvInfoDTO,UFIDA.U9.ISV.Item")]
        public DzItemInvInfoDTO InventoryInfo { get; set; }

        /// <summary>
        /// 主分类
        /// </summary>
        [DzSimpleObject("UFIDA.U9.CBO.Pub.Controller.CommonArchiveDataDTO,UFIDA.U9.CBO.PubSV")]
        public string MainItemCategory { get; set; }
    }
}
